import http from "@/utils/http"

/**
 * @description: 获取商品详情
 * @param {*} id,商品id
 * @return {*}
 */
export const getDetail = id => {
  return http.get(`/goods/detail/${id}`)
}
/**
 * @description: 加入购物车
 * @param {*} options{goodsId:商品id,number:商品数量}
 * @return {*}
 */
export const addCart = options => {
  return http.post("/shop-cart", options)
}

/**
 * @description: 获取购物车数据
 * @return {*}
 */
export const getCartList = () => {
  return http.get("/shop-cart")
}
